Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
haystack-core
Advanced tools
A core haystack implementation written in TypeScript.
This library is designed to be used in conjunction with these other haystack libraries depending on your use case...
If you're after a high performance haystack library for running on constrained devices, please see libhaystack.
npm install haystack-core
Please click here for the API documentation.
The following core Haystack types are implemented...
Each haystack value has a kind that can be queried. A haystack value can be encoded to Zinc by calling toZinc()
.
To convert a Zinc back to a haystack value see ZincReader
.
Haystack core has full support for units. The actual unit database implementation is stored in haystack-units. This enables a developer to import the whole unit database or just the units they're interested in working in.
Haystack core has comprehensive support for Haystack v4 defs. Defs add an ontology to the pre-existing haystack taxonomy that is now formalized.
The TrioReader
and TrioWriter
classes are used to read and write Trio files.
Hayson is an alternative JSON encoding format for Haystack that's being promoted.
Hayson has full support in Haystack Core.
An abbreviated namespace of useful methods has been created to make it easier to work with in environments such as a web browser.
A full haystack filter compiler implementation is included.
To work with filters please see HFilter.
HFilterBuilder
For the full grammar, please see the class definition for the Parser.
The main class to work with is HFilter. This class contains a number of high level methods that hide the complexity of working with the underlying parser.
When a haystack filter string is parsed, it's converted into an AST (abstract syntax tree) hierarchy of Nodes.
The Node tree can be used in the following ways...
The visitor design pattern has been implemented to make it easy to generate code for different targets (i.e. a haystack filter string).
Any errors caught during parsing are thrown as LocalizedError objects. This error object contains a lexicon key and arguments used for localization as well as a possible index number. If the index number is defined, it will specify the index number of the character that caused the error in the original haystack filter.
FAQs
Project Haystack Core
We found that haystack-core demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.